<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<include file="Public/header" />
</head>
<body>
<script type="text/javascript">
	var getproductorderUrl="{:U('Product/get_picklistorder')}";
	var productorderExamineUrl="{:U('Product/examinepicklistorder')}";
	var productorderInfoUrl="{:U('Product/picklistorderInfo')}";
	var productprintUrl="{:U('Product/printproduct')}";//打印
	
	var section_lists={$section_lists};
	var unit_lists={$unit_lists};
	var personnel_lists={$personnel_lists};
	var warehouse_lists={$warehouse_lists};
</script>
<script type="text/javascript" src="__PUBLIC__/default/js/picklistorder.js"></script>

	<table id="productorderDatagrid" toolbar="#productorder_tb"></table>
	<div id="productorderAddDialog" class="easyui-dialog" title="添加" style="width:500px;padding:10px 20px"
        closed="true" buttons="#productorderAddButtons"  modal="true">
         <form id="productorderAddForm" method="post" novalidate>
			<div class="fitem">
                <label>计划单编号</label>
                <input name="purchasing_no" id="productorder_purchasing_no" class="easyui-textbox" data-options="readonly:true,height:30" />
            </div>
            <div class="fitem">
                <label>申请部门</label>
				<select class="easyui-combobox" name="section_no" id="product_section_no" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <option value="0">未选择</option>
					<volist name="personnel_list" id="vo">
                        <option value="{$vo['no']}">{$vo['name']}</option>
                    </volist>
                </select> 
			</div>
			<div class="fitem">
                <label>产品名称</label>
                <input name="pro_name" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>

			<div class="fitem">
                <label>产品规格</label>
                <input name="pro_spec" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>料号</label>
                <input name="source_no" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>产品编码</label>
                <input name="pro_no" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>批次</label>
                <input name="batch_no" id="productorder_batch_no" type="text"  class="easyui-textbox" data-options="readonly:true,height:30" />
            </div>
			<div class="fitem">
                <label>制单人</label>
                <select class="easyui-combobox" name="people_make_no" id="product_people_make_no" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <option value="0">未选择</option>
					<volist name="personnel_list" id="vo">
                        <option value="{$vo['no']}">{$vo['name']}</option>
                    </volist>
                </select> 
            </div>
			<div class="fitem">
                <label>申请人</label>
                <select class="easyui-combobox" name="people_purchasing_no" id="product_people_purchasing_no" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <option value="0">未选择</option>
					<volist name="personnel_list" id="vo">
                        <option value="{$vo['no']}">{$vo['name']}</option>
                    </volist>
                </select>  
            </div>
         </form>
    </div>
    <div id="productorderAddButtons">
    	<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="productorderObj.add('{:U('Product/productorderAdd')}')" style="width:90px">添加</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#productorderAddDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /添加 -->
	<!-- 编辑 -->
    <div id="productorderEditDialog" class="easyui-dialog" style="width:400px;padding:10px 20px"
            closed="true" buttons="#productorderEditButtons"  modal="true">
        <form id="productorderEditForm" method="post" novalidate>          
            <div class="fitem">
                <label>生产计划单编号</label>
				<input name="id"  type="hidden" />
                <input name="purchasing_no" class="easyui-textbox" data-options="readonly:true,height:30" />
            </div>
            <div class="fitem">
                <label>申请部门</label>
				<select class="easyui-combobox" name="section_no" id="product_section_no" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <option value="0">未选择</option>
					<volist name="personnel_list" id="vo">
                        <option value="{$vo['no']}">{$vo['name']}</option>
                    </volist>
                </select> 
			</div>
			<div class="fitem">
                <label>产品名称</label>
                <input name="pro_name" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>产品规格</label>
                <input name="pro_spec" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>料号</label>
                <input name="source_no" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>产品编码</label>
                <input name="pro_no" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>
			<div class="fitem">
                <label>批次</label>
                <input name="batch_no" type="text"  class="easyui-textbox" data-options="readonly:true,height:30" />
            </div>
			<div class="fitem">
                <label>制单人</label>
                <select class="easyui-combobox" name="people_make_no" id="product_people_make_no" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <option value="0">未选择</option>
					<volist name="personnel_list" id="vo">
                        <option value="{$vo['no']}">{$vo['name']}</option>
                    </volist>
                </select> 
            </div>
			<div class="fitem">
                <label>申请人</label>
                <select class="easyui-combobox" name="people_purchasing_no" id="product_people_purchasing_no" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                    <option value="0">未选择</option>
					<volist name="personnel_list" id="vo">
                        <option value="{$vo['no']}">{$vo['name']}</option>
                    </volist>
                </select>  
            </div>
        </form>
    </div>
    <div id="productorderEditButtons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="productorderObj.save('{:U('Product/productorderSave')}')" style="width:90px">更新</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:
    $('#productorderEditDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /编辑 -->
	<!-- 编辑生产完成数量 -->
    <div id="productorderNumsEditDialog" class="easyui-dialog" style="width:400px;padding:10px 20px"
            closed="true" buttons="#productorderNumsEditButtons"  modal="true">
        <form id="productorderNumsEditForm" method="post" novalidate>          
            <div class="fitem">
                <label>生产计划单编号</label>
				<input name="id"  type="hidden" />
                <input name="purchasing_no" class="easyui-textbox" data-options="readonly:true,height:30" />
            </div>
			<div class="fitem">
                <label>完成数量</label>
                <input name="pro_num" type="text"  class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,20]']" />
            </div>

        </form>
    </div>
    <div id="productorderNumsEditButtons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="productorderObj.saveNums('{:U('Product/productorderNumsSave')}')" style="width:90px">更新</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:
    $('#productorderNumsEditDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /编辑生产完成数量 -->
    <!-- 搜索栏 -->
    <div id="productorder_tb">
        <form id="productorderSearchForm" method="post" novalidate>
             <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon icon-all" plain="true" onclick="productorderObj.showAll()">全部</a>     
			 领料单编号:<input class="easyui-textbox" name="picklist_order_no" style="width:150px;height:30px;">
			<a href="#" class="easyui-linkbutton searchBar" iconCls="icon-search" style="height:30px;">搜索</a>
        </form>
		<a href="javascript:void(0)" onclick="productorderObj.infoBar()" class="easyui-linkbutton" data-options="iconCls:'icon-information',plain:true">详情</a>
        <a href="javascript:void(0)" onclick="productorderObj.examineBar(1)" class="easyui-linkbutton" data-options="iconCls:'icon-key',plain:true">审核通过</a>
		<a href="javascript:void(0)" onclick="productorderObj.examineBar(2)" class="easyui-linkbutton" data-options="iconCls:'icon-key_delete',plain:true">审核不通过</a>
		<a href="javascript:void(0)" onclick="productorderObj.printBar(2)" class="easyui-linkbutton" data-options="iconCls:'icon-information',plain:true">打印</a>
		
    </div>
    <!-- /搜索栏 -->
</body>